﻿using System;
using System.ComponentModel;

namespace SCM.Common
{
    public enum ResultCode
    {
        /// <summary>
        /// 成功
        /// </summary>
        [Description("操作成功")]
        OK = 0,

        /// <summary>
        /// 微信授权成功
        /// </summary>
        WeChatSuccessful = 1,
        #region 100 类型错误 参数相关
        /// <summary>
        /// 参数错误
        /// </summary>
        [Description("参数错误")]
        ParameterError = 100,
        /// <summary>
        /// 签名校验错误
        /// </summary>
        [Description("签名校验错误")]
        SignError = 101,
        /// <summary>
        /// 验证信息错误
        /// </summary>
        [Description("验证信息错误")]
        VerifyError = 102,

        /// <summary>
        /// 文件上传错误
        /// </summary>
        [Description("文件上传错误")]
        FileUploadError = 103,

        /// <summary>
        /// 插入数据错误
        /// </summary>
        [Description("插入数据错误")]
        InsertError = 104,
        #endregion

        #region 特殊错误
        /// <summary>
        /// 超时
        /// </summary>
        [Description("超时")]
        TimeOut = 999,
        /// <summary>
        /// 禁用
        /// </summary>
        [Description("禁用")]
        Disable = 800,
        /// <summary>
        /// 错误
        /// </summary>
        [Description("错误")]
        Error = 500,

        /// <summary>
        /// 权限不足
        /// </summary>
        [Description("权限不足")]
        Forbidden = 501,
        #endregion

        #region 400错误 数据操作错误

        /// <summary>
        /// 登录失败
        /// </summary>
        [Description("登录失败")]
        LoginFailed = 400,

        /// <summary>
        /// 授权失败
        /// </summary>
        [Description("授权失败")]
        Unauthorized = 401,
        /// <summary>
        /// 账号已退出（表示被踢下线了，收到此消息将不在做自动登录操作）
        /// </summary>
        [Description("账号已退出")]
        LoginOut = 402,

        /// <summary>
        /// 未找到
        /// </summary>
        [Description("未找到")]
        NotFound = 404,

        /// <summary>
        /// 用户信息错误
        /// </summary>
        [Description("用户信息错误")]
        UserInfoError = 405,
        #endregion

    }
}
